// 引入全局样式
import '@/styles/index.scss'

// 引入unocss css
import '@/plugins/unocss'

// 引入 element-plus
import { setupElementPlus } from '@/plugins/elementPlus'

// 引入状态管理
import { setupStore } from '@/stores'

// 初始化多语言
import { setupI18n } from '@/plugins/vueI18n'

// 路由
import router, { setupRouter } from '@/router'

import { createApp } from 'vue'

import App from './App.vue'
// import router from './router'

// 创建实例
const setupAll = async () => {
  const app = createApp(App)

  await setupI18n(app)

  setupElementPlus(app)

  setupStore(app)

  setupRouter(app)

  await router.isReady()

  app.mount('#app')
}

setupAll()
